class student:
    def __init__(self, name, age, score):
        self.name = name
        self.age = age
        self.score = score

    def study(self, time):
        print("{}学习了{}分钟".format(self.name, time))

    def play_game(self, gameName):
        print("{}正在玩{}".format(self.name, gameName))

    def write_demo(self, num):
        print("{}敲了{}行代码".format(self.name, num))

    def sum(self, a, b):
        return a + b


S1 = student("张三", 18, 99)
student.study(S1, 10)
S1.write_demo(5)
S1.play_game("三角洲行动")
S1.sum(1, 2)


class car:
    def __init__(self, id, clnum, color, weight, youxiang, ):
        self.id = id
        self.clnum = clnum
        self.color = color
        self.weight = weight
        self.youxiang = youxiang

    def run(self, gn):
        print("{}是一辆{}".format(self.id, gn))


r1 = car('法拉利', 4, "红色", 2000, 200)
r1.run("赛车")


class bijiben:
    def __init__(self, id, time, color, weight, cpu, nc, yp ):
        self.id = id
        self.time = time
        self.color = color
        self.weight = weight
        self.cpu = cpu
        self.nc = nc
        self.yp = yp

    def play_game(self, gameName):
        print("用{}电脑正在打{}".format(self.id, gameName))


    def working(self):
        print("用{}电脑正在办公".format(self.id))


b1 = bijiben('联想拯救者y9000p', "20h", "白色", "16kg", "9800x3d", "32GB", "1TB" )
b1.play_game("三角洲行动")
b1.working()



class monky:
    def __init__(self, leibie, sex, color, weight):
        self.leibie = leibie
        self.sex = sex
        self.color = color
        self.weight = weight


    def makeFire(self, cailiao):
        print("{}正在使用{}来进行生火".format(self.leibie, cailiao))


    def learn(self, shiwu):
        print("{}正在学习{}".format(self.leibie, shiwu))
        

m1 = monky("峨眉山猴", "公", "棕色", "28kg")
m1.makeFire("木头")
m1.learn("吃罐头")